#!/bin/bash
# Author:左岩
# Function: check the system wheather exist the user
# 1.if not exist  create 
# 2.if exist don't create
user_count=`cat /etc/passwd |grep "^$1:" -c `
user_name=$1
if [ $user_count -ne 1 ]
    then
    useradd $user_name
    echo $2 | passwd $user_name --stdin
    else
    echo 'User Already exits'
fi

